#define _CRT_SECURE_NO_WARNINGS 1

class WordsFrequency {
public:
    WordsFrequency(vector<string>& book)
    {
        for (const auto& word : book)
        {
            ++_mp[word];
        }
    }

    int get(string word)
    {
        return _mp[word];
    }

private:
    std::unordered_map<std::string, int> _mp;
};

/**
 * Your WordsFrequency object will be instantiated and called as such:
 * WordsFrequency* obj = new WordsFrequency(book);
 * int param_1 = obj->get(word);
 */